package com.vibration;

//import com.mathworks.toolbox.javabuilder.*;
//import javaCallMatlab.plot;


public class AA {
    public static void main(String[] args){
        Float a = 2.0f;
        Double ab = a.doubleValue();
        Double aa = 1/(ab/1000);
        int aaa = aa.intValue();
        System.err.println(aaa);
        /*plot p = new plot();
        p.javaCallMatlab(1.20);
        p.waitForFigures();*/
        /*int mysn =253000106;
        byte[] b=toLH(mysn);
        System.err.println(SocketUtil.toHexString(b));
        String bb="AA55282F000081071BBE41C58B3D815AA23D41FA97BD82B6663D01409CBB014706BEC150143E81079B3D41BE21BE029C60BC01E6AABCC2ACD8BD02EF673DC160BB3D011B37BD82B666BD01D6033D82EB723D81E2B53DC21DDB3D42DEEFBD32A7C8BEA17316BE627F773EC2C3E93D81B4933DA1CD073E818FAEBD81B413BE02BA5B3D4111A93D81B413BEC1A31BBE02F651BD0193A33C81C43A3E41E3063E01298BBDC2ACD8BD02EFE73C4101823D017528BD029576BDC2ACD8BDC1DF11BE42A9E33D62155F3E81F009BD01572DBD01AA34BCC2FFDFBD82D4613DA13E0A3E415489BD016E3EBE0267D4BD020D633DC10DB43D8245E43D827AF03D8209EEBD815A22BE0206793C81F0093D0104A6BB01CF19BD81781DBD0104A6BD02D856BB02A34A3EC160BB3D812516BD010B10BD0175A8BD415489BDC206CABD81781DBD82096E3D0267D43C416B9A3D016E3E3C82D461BD41A7903D818F2E3D01401CBD01FDBBBC82B666BD81781DBE814311BE42E5D93D61583F3E81071B3D0250C33A010426BC014706BD82207FBD01409CB9016E3E3D21AC17BE812C00BE8288C43D41FA973D02E8FD3B02D8563D0147063D82DB4BBD812516BD02606A3C023248BC810E85BDC167A5BD810E85BD8143113DE180193E022BDE3D01B8883BC277CCBDC2FFDFBD81ADA9BD0285CFBCE1B5253E0224F43B817133BE813C273D424FF23D8196983D01409CB98227E9BD811E2CBD020679BDC1C800BE81E2353DE1DA0A3E0104A63C011B37BD02DFC03C02D1EC3C01298BBC02B3F13C821058BD42A963BEC160BBBDC1BA2C3E41A0263EC150943D01D603BC228048BE22F14ABE42ECC33D421A663E029CE03B02F6D1BD4203D5BDA1CD07BE4189953D620E753E0224F43C228048BE020D63BD019A8D3C02E87DBD42CEC83D21B3013E0175A8BDC269F8BD01C82F3C011BB7BC019A0DBD0285CF3D82DB4B3D02E8FDBC029576BD014786BD01FD3BBD016E3E3D21FF1E3E020679BCE2E347BE81610CBD428BE83D017C92BB41A0A63D01D6033C027E65BE01C82FBB822E533DC1AA853D4146B53DC15014BE013932BD817F073D427BC1BD82F9463D41DC1C3E815A223DE14B0DBE41DC1CBE81F0093D014706BD010426BC82815A3E01298B3C210609BE01AA343C01AAB4BC020D63BD4172843D0104A63C020DE3BD019A8DBD81353D3D8288443D01FD3BBD02606A3BC1C8003E0267543D82AF7CBD02BADBBDA26542BE81071BBD2226573E8143113E824564BDC2CA53BE0193A3BD8143113EE11F3E3EC12B2F3E81F009BE02BADBBE014786BE82B6E63D41A0A63E91C4823E8196983DA1123BBE41C58BBE01298B3C01C82F3E0250C3BC814311BE823EFABDC2B3C2BD81ADA93DF13D813EE246763E020D633D22B554BEA2E66BBEC10D34BE02777BBDE1972A3E4274D73D010426BC01C8AFBC02606ABBC11B083EE169083E01FD3BBDA26E7FBE512882BE01CF19BDC287F33DC295473EA1C61D3E029C60BD41A026BE01409CBC827AF03D82AF7C3D81A6BFBD62C941BE82B6E6BD82F25C3D427BC13D811EAC3D82635F3D813C27BD02C1C53C0104263C02426FBD82AF7CBDC1EF38BE81AD29BD4146B53DC270E23DA1CD073E0157ADBD02D1ECBC02B3713D01FD3BBD0232C83C018CB9BDA14E31BE0285CFBD027EE5BC2106893E4111293E018C39BD8217423D827AF0BD01AAB4BD819D023D828844BD02777BBDC252E7BD015E173CA1551B3EC1D8A73D827A703D02A3CA3C017C92BD61B91ABEC1AA05BE8100B13D827A703DC224C5BD02A3CA3C01C8AF3B810E053D0165013E02F6513D41A790BDE12628BE0250433B023248BC0285CFBD4238E13D81E99F3D018C39BD025043BC0242EFBC826A49BD02606A3A0267D43D4189953D01290BBE411813BE02D8D63C0165813C0104A63D018CB93DC2E1E4BD81781DBD029C603D818F2E3D017C123D01ED14BE4231F7BD01AA34BC01401C3B813C273EC1AA853D811EACBD827A70BD027EE5BC825CF53D01D603BC810E05BE81071BBDC12BAFBD0193233DA1551B3E0224743C0224F4BB02F6D1BC4203D5BD015E17BC011B373D01B11E3D02D1ECBC01B19EBD029C603CC1149EBD01B8083BC216F13D0250C3BA01409C3C0260EABC01AAB4BD02BADBBC02D8563BC149AA3D81781D3DA10214BEC13299BD01290B3DC1A39B3D41FA173E01298B3CC160BBBDE1621EBE020DE3BD8143113E029CE03C81E2B5BD01E62A3D82207FBD82F9463DA1BF333E812C80BDC206CABD029C60BC81D28EBD81A63FBD010B903C0260EA3B0122213DC1F6A23D41D5B23D029CE03B61C004BE02D8D6BD023248BD01B8883C0104263D020679BD02D1ECBC01290B3D019A8D3D010B103E810E053D810E85BDC252E7BDA27569BE812516BD01D6033E02F6D13C822ED33D0165813D0104A6BD0224743C0165813C0224F4BB812C00BD61E73CBE4199BCBD811EAC3D82F25C3D015E173C01E6AA3C0250C33D4111A93D01298BBCC206CABD011B37BE4111A9BD015E173D8171333D824C4E3D0250C33A02BADB3C41E3063EC139833D011B37BDA1FB29BE227274BE02606ABCC1EFB83D029CE03C82BD503D02854F3D4146B53D8245643D01B888BB412FA4BD81E235BE8263DFBD81610CBD017C12BC815A223DA1EB023E41FA173E8135BD3D0232C8BC02E8FDBD412FA4BD02D1ECBDC216F1BD0250C3BA819D023D02D8D6BB428BE83DB1B8913E82AF7C3D41D532BE81610CBEE1DA0ABE82DB4BBD0147063D417284BD817133BD42CEC83D21F8343E81781D3E01AA343C81ADA9BDC1C116BEA1F43FBE812596BD01B8883C0249593D02C1C53D010B903C02BA5B3CC2F8F53D02B3F13C012221BDC242C0BDA2B849BE0104A6BD0104263C01AA343D42E5D93D02426F3D41BEA13D01C8AF3DC19CB1BDC277CCBD01401CBDE18703BE01ED94BD01D6833D011B373D0295F6BC423FCB3D0249593E812516BD415409BE025043BD010426BE810E05BEC149AA3D810E053E81F0093D019A0DBC0104263D0214CDBB0250C33B82F9C63DC21DDBBDC23B56BE02C145BD82207FBD4118933D62D27E3E017C923C81D28EBD0224743C012221BC824C4EBDC149AABD022474BCE1F11BBE414D9FBD11F6993E2124043E412FA4BD01D683BD417204BE81E91F3DC1EF383E81F0093DE28956BEA17A80BE023248BC41A7103E2272743E2169373E026754BEA1559BBE0139323DE2DC5D3E81C43A3D21B301BEC1D827BEC167A5BD423FCB3D62A45C3EE116013E41FA17BEE2FA58BE0260EA3C01CF993D0250433C01ED143D019323BE82D461BE21CA123EA16CAC3E4111A93D824C4EBE012221BEC259D1BD026754BDA293643E21B3013E626F50BEC23BD6BD0206F93D6131073E015E97BCC2E1E4BD41B7B7BD01AA34BD0122A13D82DBCB3DC19CB1BDC11B08BE020DE3BCC1C8003EE2F36E3E015E17BC221F6DBE020D63BE02C1C5BC21778B3EA137203EC2B3C2BDA2C870BE01C82FBEE2FA583EA222623E01401C3B0104A6BD42565CBE4146B5BD8210D83D02B3F13D81353D3D826AC9BD02F6D1BC015E17BC01E6AABCC21DDB3DC1EFB8BD029576BDC259D13D4213FCBD02777BBD02606A3D02D8D63D416B1A3E21AC17BE42A2F9BD0242EFBCC234ECBD21770B3EC259D13D81D28EBD0260EABC020679BC416B9A3D02606A3B01CF19BD02E8FDBB8245E4BD025043BC82F25C3D0260EABB01572D3D01AA343C410182BD0295F63C82815A3DC2E8CEBD02EFE7BD0104263D82F2DC3D02BA5B3C02E87DBCC13983BD823EFABD011B373DC234EC3D81C43A3D016581BD42A9E3BD0249D9BC81AD293DE10F173E01298B3DE1082DBE026754BE01D6033C612A1D3E016EBE3C01D6033C0242EF3CC270E2BD014706BD02D1EC3D011BB73CC2ACD8BDE11601BE02E8FD3B8100B13D02426F3C029CE03C02D1EC3C01409CBB01409CBC02C1C5BC025043BB0249D9BDC1C800BE4284FE3DA1EB023EC167A5BD02D1ECBC018CB93B81781DBD0139323D0267D43D81C43ABDE28956BE414D9FBD8288C43DC2C3E93DC139833D0104263C81079BBDC2C3E9BD02144DBC4101823D82815A3D019A8DBD421AE6BD02D8563B4172843D027E653D027E65BC0175A8BC01290B3D0267D4BC826A49BD027E65BC017C92BD018CB9BBC1C8803D017C12BD011BB73C8196983D018CB9BC01D6833C02C1C53C0285CFBD410ABFBD027E653C01401CBA82986BBD42DEEF3D01409C3D81781DBE02C1453D015E973D814391BD01C8AF3B410ABFBDC2FFDFBD412FA43DC252E73D027E653C02E8FDBC8196183D019A0DBC02E8FDBD0104A6BB029CE0BBC2E8CEBD81610C3DC252E73D8100B13D014706BD42ECC3BD81E91FBD0250C3BC022B5E3D011BB73C02C1C5BD81B493BD01FDBB3C81A6BF3D41DC9C3D8196983D01D603BD82DB4BBEC216F1BD01ED943C82F9C63D020D633D01AAB4BC01409C39821742BD01401C3DC16E8F3D82AF7CBD01B11EBD0214CDBC01FDBBBC016581BD0242EFBC82DBCB3D02DFC03C018CB9BB02426F3C02D856BC017C12BC01B808BD01B888BC011B37BD81B413BD81071B3D0260EABB0277FB3C8100313D417284BD017C123D0250C33C8153B8BD01B808BD412FA4BD01C8AFBB826A493D81D20E3D41E3063E018CB9BCC1BAACBD01B888BD017528BD823E7A3D4231F7BD81071B3D2170213EC1FD0CBE0277FB3C818FAE3D0175A8BD0122A13C010B90BC81C4BABD82BD50BD02D1ECBCC1AA853DC1C8003E01ED94BC41FA97BD01B8883B019A8D3C01B8083B02C145BD02F651BC82986BBD82F946BD819D023E018C393C02D16CBD0260EABA812C00BD0165013D823E7A3D0232C83C616613BE41DC1CBEC2BCFF3D01409C3D029C60BC82815A3D82D4E1BD4128BABD82F25C3DC150943D810E853D8263DFBD0267D4BD01409C3A01B888BC41F3AD3D81618C3D01E62A3C81E91FBD01B808BE0157ADBC817F873D81071B3D01C82F3C02E8FDBBC11B88BD410102BE81CB243D81D20E3E81789D3D0285CFBCE2FA58BE82CDF7BD4284FE3D424FF23D01D683BC01AA34BC812516BDA13E0ABE811EAC3DA2B8493E821742BD02DF40BEA19111BE02EFE73CC269F83DE1621E3E01C8AF3CF1018BBE81B493BD41E3063E014786BCC2ACD83D41FA973DE18019BEC224C5BD0104A6BC416B9A3D818F2E3D82EB72BD011BB7BC02606ABC82207F3D0267D43CC17EB6BD019A0DBD01401CBA016EBE3D02EFE73D61412EBE826A49BE819D023D21770B3E41DC1C3E01401C3CC259D1BDC1603BBE017528BE82AFFC3D42DE6F3E01D6833D4231F7BD21FF1EBE411893BD81E2353D8210583EC12BAF3D026754BE8298EBBD0267D43C016EBE3C0249D93D0224F43C813CA7BD428BE8BD817133BD4203D53D01D6833C810E053D01401C3B41993CBE018CB93B4189153E0295F63C024959BD01B19EBD01401CBC0250433C019A0DBC817F073D02C1C53C01401C3B0260EABA81B413BE01FDBBBD019A8D3D019A8D3DC160BB3D014786BCC160BBBD02144DBD01B8083B82B6E63D01FD3B3D61130CBE61840EBE016501BD4154093E4213FC3D812596BD82635FBD02144DBC01AA343D21770B3EC206CABD9163A7BE42B0CDBD019A0DBD01C8AF3B0250433B01C82F3B015E173C017C92BC02D1ECBC0260EABB01401CBB029CE0BB01409C3B018CB93B020679BC016581BC02606ABA0193A3BC0104A6BC029CE03B0224F4BB018C39BC0122213C02E87D3B000000000147063D81610C3D810E05BD81618CBD02C145BD0232C8BC0214CD3B81CB243D0267D43C019A8DBC0139B2BC0260EA3A02426F3C015E173C0260EABB81D20EBD817F07BD025043BB01B888BB023248BC015E17BC017C92BC02BA5BBC01C82F3C010B903C01B8883B02E87DBB0250C3BA018CB9BB012221BC0104A6BB018CB9BC02B3F1BC02606A3B0165813C01B808BB02F651BC02DFC0BC01290BBD01D683BC0122A13C02B3F13C017C923B02F651BC02606ABC029CE0BB02D8563C02D8D63B0157ADBC012221BD014706BD01401CBB029C603C011BB73C02E87D3C017C92BC02D1ECBC0104A6BC02D856BC01401C3A019A0D3C01B808BB02606ABC01D603BC017C923B01AA343C0165813C019A0D3C01C8AFBC82BD50BD82F946BD02426FBC01C82F3C02144D3C02D8563B02F651BC019A0DBC015E173C017C923C0175A83C01409CBB81610CBD02A3CABC01ED94BC02426FBC0232483C01401C3C010B90BC02F651BC01409CBA01B888BB0250433B01409CBA0267D4BC0157ADBC029CE03B01ED943C02E87D3C0224F4BB81071BBD01CF19BD01E62ABC0206793C019A0D3C010426BC0260EABB01C8AFBB01401C3A01E62A3C017C923B018CB9BB029CE0BC819618BD02F651BC02D8563C0165813C01401CBA02BA5BBC01FDBBBC025043BC0122213C017C92BB0260EABC810E05BD02BA5BBC0165813C81B4133D0175A83C810E05BD811E2CBD0250C3BB02E87D3C02F6D13C02144D3C01B11EBD82B666BD01AA34BC015E973C01298B3C0250C33B0122A1BC01AA34BD0295F6BC0224743C02D1EC3C019A8D3C025043BB812C00BD810E05BD01C8AFBB01298B3C01B8883C02606A3A819D02BD82635FBD01FDBBBC0214CD3C01B8083D0165813C017C92BC019323BD01CF99BC01C8AF3B0139B23C01401C3B0295F6BC0285CFBC017C92BC0214CD3B019A8D3C01B808BB02F651BC81D20EBD012221BD0260EA3B0122213D016EBE3C0214CD3B02426FBC01B11EBD0206F9BC01401C3B02F6513C029C60BC0175A8BC0157ADBC02D8D6BC01AA343C815A223D0122213C01ED94BC01409CBC0285CFBC01B19EBC01401C3A01C82F3C02606A3C02426F3C02D8563B0232C8BC010426BD0250C3BC01C82F3B0250C33B029C60BC019A0DBD814311BD0250433B02426F3D4118933D02F6513CC1C880BD016EBEBD823E7ABD01CF993C416B9A3D022B5E3D016581BC825C75BD017528BD018CB93B0206F93C0147863C016501BD41A790BD016E3EBD01298B3C010B903DC16E8F3D017C923B825C75BD811EACBD824C4EBD01CF993C81C43A3D01CF993C014706BD02144DBD018CB9BB81E91F3D011B373D0250C33B81C43ABD022474BD02BADBBC027EE53C01C82F3D01B8083B019323BD018C39BD02144DBC022BDE3C81610C3D02606A3B014706BD81AD29BD02F6D1BC01401CBA0175A83C01ED943C0260EA3A01E62ABC01D603BC0250C3BB020679BC027E65BC02BA5BBC0224F4BB01401CBB01D603BC018CB93B01D6033C01B888BB02D8D63B0104A6BB017528BD811E2CBD017C92BC01AA343C01FDBB3C01D6833C01C82F3B0250C3BC0250C3BC015E17BC01409CBA02D8563B016581BC0139B2BC01C82FBC01409C390104A63C01B19E3C029C60BC81D20EBD02DFC0BC000000000104263C018CB93B01C82FBC01B808BD017C92BC02E8FD3B02606A3B01409C3A01409CBA02F651BC018CB9BC029CE0BB01B8883C01AA343C0260EA3A02144DBC819618BD0295F6BC018CB93B0214CD3C0206793C02F651BC012221BD019323BD027E65BC0165813C02E87D3C0250C3BB02BA5BBC017C12BC0104A63B010B903C0000000002F6D1BC81781DBD02EFE7BC01AA343C017C923C01401CBB019A0DBC02144DBC0214CDBB01C82FBB0104A6BB02E87DBC01409CBC029CE0BB01401CBA02E8FD3B0260EA3B0104A6BB0175A8BC020679BC01401C3B017C923B01C82F3C02606ABA02E8FDBC81F009BD02BA5BBC02606ABA01E62A3C0165813C02D856BB019A8DBC02E87DBC01C82FBB0157AD3C017C123C810E05BD015E17BD02DFC0BC01401CBB0224F43C02C1C53C029CE0BB0224F4BC02A3CABC01401C3A015E173C0224F43B0260EABB022BDEBC022474BC02D8D63B0104A63B01409C390250C3BB02D1ECBC810E05BD01E62ABC01B808BB01401C3B027E653C02426F3C01409CB901AA34BC0214CDBB017C92BB00000000025043BB02D8D6BC0260EABC01C8AFBC02606ABC019A8D3C0250C33C01409C3A01298BBC02EFE7BC01C8AFBC01409CBB016E3E3C010B903C01B808BB018CB9BC016581BC0104A63B01298B3C02D8D63B011BB7BC01D603BD01FDBBBC01AAB4BC025043BC01D6033C02426F3C02144D3C02D8563C02606A3A01B888BC02D856BC02BA5BBC0193A3BC01B19EBC0122A1BC018CB9BB027E653C01AAB43C0165813C029C60BC81D20EBD02DFC0BC027E65BC029CE0BB02606A3B0250C33A01B8883B01C82F3C01C82F3C01401CBB010B90BC02C1C5BC010B10BD810E05BD02E87DBC01B8083B018CB93C02D8D63C0104263C02D8563B01C82FBB016581BC020679BC019A8DBC02D1ECBC02B3F1BC01409C3A02B3F13C019A8D3C01B8083B010B90BC819D02BD01D603BC02606ABA015E97BC019A8DBC023248BC02606ABA01C8AF3C02A3CA3C0104263C02144DBC0295F6BC81610CBD0249D9BC0250C3BB0104A63B0260EABB016581BC0250C3BA01298B3C016EBE3C01B8083C027E65BC02A3CABC02B3F1BC0193A3BC01401C3A01D6033C0260EABA017C12BC012221BC01E62ABC01C8AFBB02E8FDBB01D603BC01409CBB010B90BC012221BC0193A33C016EBE3C0232483C0214CD3B01ED94BC02F651BD813C27BD0224F4BB01401CBA01B8883B01409C3901E6AABC020679BC0206793C02D8D63C02D8563B01D683BC819D02BD81B413BD01409C3B01E6AA3C01409C3A029CE03B01C8AFBB014706BD02BA5BBC02D8563C01C82FBC81071BBD019A8DBC01B8083B018CB93B027E653C02F651BC814311BD01409CB902B3F13C01AAB43C025043BB017C12BD821058BD0267D4BC0267D43C0267D43C01D683BC810E05BD01409CBC0122213C0147063D02DFC03C01D683BC02DF40BD01D603BD029CE03B017C923C0260EA3A018C39BC0249D9BC812C00BD01C82F3B02C1C53C01B19EBC811E2CBD01409CB90122A13C015E973C019A8D3C014786BC011B37BD016EBEBC01CF993C0122A13C01C8AFBB02D856BC0139B2BC023248BC016E3E3C0250C33B02426FBC01C8AFBC012221BC0260EABA015E17BC027E65BC02606ABC000000000250C33C02606A3C02D856BC819D02BD01AAB4BC0175A83C0260EA3C0214CDBB011B37BD022474BD01C8AFBC0232C83C01B11E3D017C923C02B3F1BC012221BD02E87DBC01401C3B0122A13C01ED943C01B808BC81610CBD011BB7BC02606A3B02D8563B0224F43B02E8FDBB81AD29BD01401CBD0104A6BB029CE03C010B103D0250C33B810E05BD019323BD0175A8BC0122213C0175A83C01409C3B012221BC02B3F1BC01ED94BC016E3E3C019A0D3C02E8FDBB0122A1BC0122A1BC01C8AFBC01C82FBB01B19E3C01409C3B025043BB02D856BB019A0DBC02144DBC027E65BC01C8AFBB0250C33A01B8083B0104A6BB020DE3BC022BDEBC0000000002E8FD3B0122213C017C923B02BA5BBC0193A3BC0250C3BA01AAB43C017C123C019A8DBC819618BD01401CBD016581BC029CE03B01AAB43C01C8AF3B01E6AABC02606ABC0250433B01E62A3C0250C33B02BA5BBC01CF99BC022474BC022474BC01409C390224F43B02606ABA016E3EBC018C39BC02D8D6BB022474BC01B808BC017C923B01401C3A0104A6BB012221BC0193A3BC01AA34BC01D6833C018CB93C01409CB902C1C5BC02F6D1BC02DFC0BC0214CDBB0193A33C0250C33B0157ADBC0267D4BC023248BC0224F43B019A8D3C01B8083C02144DBC011BB7BC010B90BC01AA34BC015E173C0206793C0104A6BB01B808BC020679BC02D8D6BC020679BC01C82FBB019A0DBC014786BC017C12BC01401CBA01B8883C0175A83C02606ABA01C82FBC016581BC0285CFBC0250C3BC02D8D6BB0260EA3A029CE0BB025043BB01C8AF3B01401CBA0104A63B0104A63B018CB9BC0267D4BC02606ABB01401C3A0250C3BA01C82F3B0250C3BA014786BC01B888BC029C60BC017C92BC0214CDBB017C923B01D6033C0250433C017C923B018C39BC0122A1BC023248BC0104A6BB0104A6BB01E62ABC02DFC0BC01E6AABC025043BB02144D3C01AAB43C017C923B0214CDBC812C00BD01AAB4BC02606A3A0206793C01D6033C02E8FDBB0214CDBC012221BC0260EA3B01B8083C018C393C02E8FDBB027EE5BC01ED14BD02C1C5BC01401C3A0250C33B017C923B02E8FDBB01E62ABC0250C33B0224F43B02606A3A0214CDBB02E87DBC01ED94BC02F651BC02D8D6BB01B808BB01409C390000000001401CBB019A0DBC01D683BC016581BC019A0DBC0104A6BB02D8563B0250433C01401C3A02426FBC02606ABC01401CBC01E62ABC01AA34BC01409C3A02E87D3B01D603BC02606ABB019A0DBC02D856BC01B8883B029CE0BB029CE0BC01CF99BC010426BC0250C33A018CB93C017C123C027E65BC0224F4BB02E8FDBB0260EABB02606A3A010426BC02A3CABC016581BC0224F4BB012221BC01B8883B01B888BB0122A1BC02606A3A0165813C0260EA3B0224F4BB012221BC02E8FDBB017C92BB02D8D63B02606ABB02EFE7BC022BDEBC01AA34BC01C82F3B01CF993C019A0D3C01ED94BC018CB9BC020679BC01B808BB02606A3C02144D3C02F651BC020DE3BC0175A8BC029CE0BB01B8083C02D8563C01409CBB819D02BD814311BD01AA34BC02C1C53C813C273D029C603C029CE0BC81AD29BD016EBEBC0260EABA02BA5B3C0260EA3B0206F9BC01ED14BD01B808BB01B19E3C01B19E3C01401C3A81D20EBD015E17BD029CE03B022BDE3C0122213C01401CBC027EE5BC019323BD016581BC020DE33C02D1EC3C0224F4BB81F009BD010B10BD020679BC01C82F3C019A8D3C01B8083B017C12BC016E3EBC01D603BC02E87DBB019A0DBC018CB9BB02606A3B0250C33A0232C8BC01B808BD01AA34BC01409C3B022BDE3C0232C83C027E65BC01AA34BD818F2EBD02E87DBB817F073D815A223D0104A63B018C39BD029C60BD01409CBC0267D43C0242EF3C0250C3BA0260EABC81E91FBD018C39BC02A3CA3C0249D93C01409C3B0232C8BC010426BD029CE0BC0104A63B0242EF3C029CE03B81610CBD020DE3BC025043BB02D8D63B0206793C0104A63B014786BC0214CDBC01409CBC01B8083B01CF993C0147863C0224F4BB01E62ABD011B37BD01CF99BC02D8563C0295F63C0232483C02F651BC0175A8BC017C12BC01AA343C015E173C010B90BC019A0DBD02D1ECBC025043BB0104A63C02606A3C01401CBC029CE0BC0250C3BB018C393C02606ABC015E17BC011B373D01C8AFBB01B19EBC01B888BB0175A8BD01ED14BD01E62A3D01E62A3C017C923C0147863C01290BBD029CE0BC02606ABB01C82FBB01409CBB02EFE7BC022474BD01B11EBD0249593DA137203E42C7DE3D811E2CBD410ABFBD81B413BEC18C0ABE01B888BB416B9A3D02D16C3D015E973C0224F43C0139B23C015E973C01B8083B825C75BD82AF7CBD027EE5BC015E17BC017C92BC029C60BC02144D3C01B8083C0206793C02E8FD3C819D02BD02426FBD02F6513C029CE03B01B8883B81F0093D02D1ECBC02854FBD0250C33A019A0D3D0139323D01C8AF3B81071BBD41A0A6BD02F6D1BD017C92BC017C123D0147063D818F2E3D01C8AF3C017C923B01409C39812C003D016EBE3C81F089BD81CBA4BD02777BBD813C27BD0122A13C02606A3D41D5B23D0104263D019323BD82815ABD819D82BD0139B2BC0175A83C019A8DBC01AAB4BC01C82FBC029CE0BB817F073D01AAB43D01C8AF3D01D603BDC234ECBD423FCBBD416B9ABD016EBEBC0147063D82986B3D01E62A3C0242EFBC82F9463D82CD773D01409CBB02E87DBB014786BC41368EBD410182BD025043BC019A0D3C0165813C02DFC03C0250433C0104A63B027E653C01B888BC819D82BD02D16CBD019323BD019A0D3C02777B3DC1F6A23D8171333D81D28EBD825C75BD0260EA3A812516BD01B808BD0214CDBC018C39BC0242EF3C01C82F3C8143113D4189953D02606A3A82207FBD027E65BD810031BD016501BD019A0D3C0260EA3C01E62ABC01C82FBB82815A3D022BDE3C824C4EBD81B493BD0122A1BD81A63FBD02777B3D82F2DC3D029CE03C022B5EBD817133BD02DFC0BC0175A83CC185A03D02E87D3C813CA7BD015E97BD019A0DBC0260EABA027EE53C812C803D0232C8BC0175A8BD818F2EBD02D8563B01CF993C8245643D0139323D81A63FBDC1FD8CBD812516BD0214CD3C01D6833D020D633D01CF99BC02E8FDBD81ADA9BD8125163D0250433D02D8563C020DE33C024959BD022B5EBD8245643D0104A63C0250433C029CE0BC41FA97BD01B8083B015E17BC02606ABA4101823D010426BCC17EB6BD01CF99BD01409C398125963D02EF673D4101823D02BA5B3C8263DFBD817F87BD02606A3B02E87D3B020DE33C01401C3B82EB72BD821742BD029CE03B01AA343D01C82F3D0104A63B02144DBC010426BD818FAEBD82DB4BBD029CE03C019A8D3D82DBCB3D0104263DC1A39BBD4292D2BD02C145BD01AA343D02D1EC3C02F651BDC160BBBD825CF5BD02D8563B02DF403E82815A3E8125963D42A9E3BDA25E58BEC22445BE02D1ECBCE14B0D3EC269F83D0277FB3C0260EABB01290BBD017C92BC018C393D01409C3C414D9FBDA13720BE01290BBE018CB93B812C003E4221503EE180193E02BA5BBD81781DBEC1DF11BE019A8DBD020DE33C02D1EC3C01CF99BC016501BD0277FB3C8288C43D01C8AF3D02D8D63CC1C196BD61F510BE41D5B2BD017C923C82D4613D0249D93C029C60BC01409CBC01C8AF3B016EBE3C0267D43C015E973C01290BBD01E6AABD02777BBD82F25CBD000000000147863D019A8D3D41A0A63D01409C3B81A63FBD822769BD41FA97BD01409CBA01CF99BC815A22BD019A0D3C015E17BC824C4E3D81A6BF3D82986B3D0165813C823EFABDA15C05BEC13983BD82F25CBD02E87D3DC1A39B3D0260EA3C022BDE3C02D8D6BB0104263C022474BC823E7ABD010426BD81353DBD815338BD0224F43B8143913D427BC13D01B8883B010426BD0139B2BC82DB4BBD0214CDBB02606ABB81AD29BD81E91FBD0122A1BC81F0093D0122213C0249D93C81C43A3D01572DBD02D856BD01C8AFBC01C82FBB010B103D0139323D01C8AF3BC11B88BD01E6AABD02BA5B3C8125963D01B11E3D0104A63C029C60BD826AC9BD0250C3BC017C12BC01B8083B01D6033C029C60BC8196183D81071B3D01AAB43C02DFC03C029576BD415489BD01D603BD027E65BC0157AD3C016581BC0104263C0147063D01B808BB0175A83C0175A8BC81618CBD81F009BD016EBEBC0250C3BA01AA343D011BB73C0000000002D8D6BC02D8D6BC0260EA3A017C92BB011B373D0122213C024959BD01C82FBD02B371BD023248BC01E62A3D01E62A3D0104A63C01401CBD811E2CBD029CE03C0147063D02426F3C02DFC0BC824CCEBD812596BD0260EABA81618C3DC10DB43D015E17BC0157ADBC01CF99BC82BD50BD0122A13C018CB9BB02D856BD0232483C01409C3902D856BC815A223D810E053D0260EABA01CF99BC81618CBD018CB9BDC1C880BD017C92BBC18C8A3D01CF993D8217423D02606ABB0232C8BC0250433C01B8883B01AA34BC010426BD8217C2BD819D82BD014786BC019A0D3DC287F33D02426F3D81CB24BD81E235BD41B7B7BD415489BD01AAB43C02A3CA3C0232C83C02606ABA02BA5BBC020D633D8217423D01B808BB02D856BC018C39BD01ED94BD0139B2BDC18C8ABD019A0DBC0224743D8281DA3D817F873D0250433C02606ABC018C39BD81D20EBD013932BDC1D1BDBD410182BD018CB9BB812C803DC2DAFA3D022B5E3D01B808BC01B11EBD414D9FBD019A8DBD014786BD01B808BD0224F43B824C4E3D410ABF3D41A7903D017C123D017C923B01572DBD42C7DEBD01D603BEC224C5BD01E6AABC82AF7C3D0122A13D02A3CA3D41DC9C3D027E653C022474BC0232C8BCC1F6A2BD218E1CBEC1BAACBD0104A63C0147863D0249D93D4101823D0000000001409CB9027EE5BC417284BDC1D8A7BDC1D1BDBD81781DBD02A3CA3C8143913D8263DF3D414D9F3D01B19E3C81353DBD82BDD0BD01CF99BD02F651BD02D16CBD02D8D6BB0224F43B0232C83C41F3AD3DC1FD8C3D81AD293D02606ABA81618CBDC1149EBD41F3ADBD810E85BD01290B3D02606A3D0260EA3C0232483D0147863C01401CBD0295F6BC02E87DBB027E65BD822ED3BD01D683BC0175283D02426F3D426DED3D4164B03D02144DBCC185A0BD02C1C5BD41A790BD017528BD02606ABB01C82FBB01B11EBD019A8D3CC1FD8C3D02EF673D010B903D02E87DBC0206F9BD014786BD0260EABC0260EABB81071B3D813C273D81AD293D0224F4BB02BA5B3C0214CD3B4203D5BD814391BD02DFC0BC01409C3A82986B3D02606A3B023248BD016EBEBC01E62A3D427BC13D027E653D019A8DBC42C7DEBD81F009BE029CE0BBC1D8A73D02BADB3C81D20EBD029CE0BC02606A3B8196183D81353D3D02D8D63B025043BD81E99FBD020DE3BC0295F63C0250433C02E87D3C02BA5B3C02A3CABC01E6AA3C810E053D819D82BDC270E2BD41C58BBD0250433C82635F3DC1D8A73D819D823D02D856BD014786BD0214CD3B01B8883B01B888BC018CB9BC02D8563B01CF993C025043BB01B888BB02BA5BBC0285CFBC015E173C01B19E3C017C12BC014786BD0267D4BD02BA5BBC4118933D425DC63D0250433D81ADA9BD41D5B2BD010B90BC0165813D42ECC33D027EE5BC8153B8BDC1A39BBD02144DBD826A493DC1C1963D02B3F13C0193A3BC410182BD815A22BD819D02BD027E653C8217423D01409CBB02D8D63C01AAB4BC01298BBD82635F3D81AD293D014786BC019A8DBDA1CD07BE023248BC8171333D8143913D4256DC3D01CF19BD4111A9BD01B11EBD014786BC029CE03C02E87D3B01C82F3C0104A6BB01401CBD01AA343C029C603C0250C3BA017C12BC018C39BD811E2CBD029CE0BB01409CBB018C393C027E653D0122213D0139B2BC82B666BD010B10BD020679BC0157AD3C02A34A3D02BA5BBC822769BD82986BBD012221BC01E62A3D020DE33C00000000829F55BD023248BD0295F63C0175A83D810E053D81CB24BD015E17BD016581BD41368EBD01298B3C8143113D01B808BC017C92BB016E3E3C0104A63C02E87DBB014786BC018CB93B02DFC0BC01E62ABD0232C8BC01C8AFBB0147863C01409C3C818F2E3D0260EA3C81D28EBDC1DF91BD02606ABA0250C3BB01B8083C0175A83C02C1C5BC026754BD02D856BB81D28E3D82096E3D01409C3A828844BD41E386BD82B666BD027E65BC8143113D0242EF3C02144DBC824C4EBD027E65BC0260EA3C01ED943C018C393C01C82FBB029C60BC812516BD02144DBD025043BB0260EA3C02C1C53C0147063D02144DBC02D856BD0104A6BC0224F4BC81B413BD019A0DBC819D02BD01AAB4BC016E3E3D82AF7C3D0214CD3C01D6033C02D8563B416B9ABD81B493BD0122A13C02C1C5BC0104A6BC0139B23C01401CBA81E2353D81E2353D0232C8BC025043BD81E235BD810E05BD0214CDBC019A0D3C82F25C3D01ED943C01AA343C015E973C81A63FBD015E97BD82207FBD01401CBB818F2E3D810E053D81F0093D0250C3BB0104A6BC02D8563C029C603C027E65BC018C39BD821058BD01298BBD0250C3BC010B903D81B4933D0206F93C020DE3BC029576BD81A63FBD02D8D6BC02B3F13C0206793C029CE0BB01D6033C01AAB4BC015E17BC010B903C011B373D0249D93C02DF40BD02B371BD022474BD81B413BD019A0D3C0175A83C01E6AA3C02606ABA0260EA3B01298B3C017C92BB01409CBA027EE5BC818F2EBD0250C3BB810E05BD01AA34BC01572D3D01E6AA3C017C123D0000000081F009BD01C82FBD81ADA9BD025043BC02F6D13C81D20E3D8143113D029C60BC81F0093D02E8FDBC017C92BD0147063D0214CDBC812C00BD02B3F13C01D683BC029CE0BB018CB93C0232483C01E62A3C81D20EBD41D5B2BD0277FBBC01B8883C02F6513C016EBE3C02144D3C019A0D3C01E62ABC0104263C02144D3C02854FBD01E6AABC023248BC02EFE7BC018CB9BB01CF99BC02A3CABC015E97BC017C123D02606A3D01FDBBBC0104A6BC02D8D6BB81B413BD02A3CA3C812C003D017C12BC019A0DBDC11B88BD01B8083B0250C33C01C8AF3B01B8083D0104A6BC82D461BD821742BD01B808BC82096E3D0122213D01409CB981F009BD02854FBD014706BD02606A3CC139833D01C8AF3B81F089BDC17EB6BD824C4EBD017C923DC2B3C23D01C8AF3C0139B2BC81E91FBD823E7ABD01E6AABC027E653D018CB9BB814391BD810E05BD0165813C0250433D01ED943C022474BC82EB72BD022474BD0250433D81B4133D02E87D3B81F0093D029C60BDC13299BD0250C3BB02144D3C81A63F3D02BA5B3C0242EFBC010B10BD02144DBD02144DBC018CB93B0267D43C8153383D02D8563B0175A8BC82B666BD02D16CBD829F553D81618C3D02E87DBB824564BD82DBCBBD822E53BD022BDE3CC295C73D029CE03D01401CBCC2E1E4BD4256DCBD02F6D1BC02BA5B3D0139B23D02A34A3DC1DF91BD0285CFBD02144DBC01FDBB3C8196183D8143113D013932BD01D683BD0277FBBC0285CF3C825C753D01B8883C0250433B02D16CBD017C92BD02BADB3C0193A33C02D8D6BB01B888BB02F6D1BC015E97BC02D8D6BB018C393C0214CD3C0224F4BB01B11EBD81E235BD011BB7BCC1DF913D81E99F3D0224F43B81AD29BDC2CAD3BD41368EBD02606A3B8153383D0139323D02F6D1BC81B413BD0214CD3C02854F3D017C123D014706BD019A8DBD0242EFBC029CE0BC01401CBB015E173C0224F4BC01E6AA3CC17EB63D01B8083DB0070A119608000095438B6C453816414694F686CBDC314133392E3134342E352E3138320002000000000000AA79140F8B8AEA0000000000010000000080F041CC7EE54000002041926D28B4";
       System.err.println(bb.substring(4));
       System.err.println("包头:"+bb.substring(0,4));
       System.err.println("长度:"+toInt1(SocketUtil.hexStringToBytes(bb.substring(4,4+8))));
       String Z =  bb.substring(12,12+8000);
       System.err.println("Z:"+Z.toLowerCase());
       String X = bb.substring(12+8000,12+8000+8000);
       System.err.println("X:"+ X);
       String Y = bb.substring(12+8000+8000,12+8000+8000+8000);
       System.err.println("Y:"+ Y);
        *//*int b = 1;
        for (int i = 0; i < 8000; i=i+8) {
            String z = Z.substring(i,i+8);
            System.err.println("Z"+b+":"+bytes2Float(SocketUtil.hexStringToBytes(z))*1000+"mV");
            String x = X.substring(i,i+8);
            System.err.println("X"+b+":"+bytes2Float(SocketUtil.hexStringToBytes(x))*1000+"mV");
            String y = Z.substring(i,i+8);
            System.err.println("Y"+b+":"+bytes2Float(SocketUtil.hexStringToBytes(y))*1000+"mV");
            b++;
        }*//*
        String cc =  bb.substring(12+8000+8000+8000,12+8000+8000+8000+144);
       System.err.println("数据信息:"+ cc.toLowerCase());

        String GPST_TOWMs = cc.substring(0,8); //GPS 时间毫秒时间部分
        System.err.println("GPST_TOWMs:"+GPST_TOWMs );
        System.err.println("GPST_TOWMs:"+toInt1(SocketUtil.hexStringToBytes(GPST_TOWMs)));
        String GPST_WeekNum = cc.substring(8,16); //GPS 时间周数时间部分
        System.err.println("GPST_WeekNum:"+GPST_WeekNum );
        System.err.println("GPST_WeekNum:"+toInt1(SocketUtil.hexStringToBytes(GPST_WeekNum)));
        String  latitude_val = cc.substring(16,32);
        System.err.println("latitude_val:"+latitude_val );
        System.err.println("纬度:"+bytes2Double(SocketUtil.hexStringToBytes(latitude_val)));
        String   longitude_val = cc.substring(32,48);
        System.err.println("longitude_val:"+longitude_val );
        System.err.println("经度:"+bytes2Double(SocketUtil.hexStringToBytes(longitude_val)));
        String ip =cc.substring(48,80);
        System.err.println("ip:"+ip );
        System.err.println("ip:"+new String(SocketUtil.hexStringToBytes(ip)));
        String Clock_Drift = cc.substring(80,88);
        String sn = cc.substring(88,96);
        System.err.println("SN:"+sn);
        System.err.println("SN:"+toInt1(SocketUtil.hexStringToBytes(sn)));
       String freeMemory = cc.substring(96,104);
        System.err.println("TF卡可用存储KB:"+toInt1(SocketUtil.hexStringToBytes(freeMemory)));
        String  GPS_State = "0000"; //gps 4 种状态： 0：关闭 ，1：GPS 开启， 2:     2D（平面地图锁定） ，3： 3D（立体地图锁定）
        System.err.println("GPS状态:"+byte2int(SocketUtil.hexStringToBytes(GPS_State)));
        String satellite_Num = "0000";
        System.err.println("卫星数:"+byte2int(SocketUtil.hexStringToBytes(satellite_Num)));
        String data_type= "01000000";
        System.err.println("数据类型固定值0x02:"+toInt1(SocketUtil.hexStringToBytes(data_type)));
        String temperature = "0080F041";
        System.err.println("设备当前温度:"+bytes2Float(SocketUtil.hexStringToBytes(temperature)));
       String voltage = "CC7EE540";
       System.err.println("电池电压V:"+bytes2Float(SocketUtil.hexStringToBytes(voltage)));
        String sampleInterval = "00002041";
        System.err.println("采样间隔ms:"+bytes2Float(SocketUtil.hexStringToBytes(sampleInterval)));
        String jiaoyan=bb.substring(12+8000+8000+8000+144,12+8000+8000+8000+144+8);
       System.err.println("校验位:"+ jiaoyan);
        //校验码
        CRC32 crc32 = new CRC32();
        crc32.update(SocketUtil.hexStringToBytes(bb.substring(4)));
        System.err.println("crc32校验码"+crc32.getValue());
        System.err.println("校验位："+toInt1(SocketUtil.hexStringToBytes(jiaoyan)));*/



    }

    //低字节在前
    public static byte[] toLH(int n) {
        byte[] b = new byte[4];
        b[0] = (byte) (n & 0xff);
        b[1] = (byte) (n >> 8 & 0xff);
        b[2] = (byte) (n >> 16 & 0xff);
        b[3] = (byte) (n >> 24 & 0xff);
        return b;
    }

    //高字节在前
    public static byte[] toHH(int n) {
        byte[] b = new byte[4];
        b[3] = (byte) (n & 0xff);
        b[2] = (byte) (n >> 8 & 0xff);
        b[1] = (byte) (n >> 16 & 0xff);
        b[0] = (byte) (n >> 24 & 0xff);
        return b;
    }

    //低字节在前
    public static int toInt1(byte[] b){
        int res = 0;
        for(int i=0;i<b.length;i++){
            res += (b[i] & 0xff) << (i*8);
        }
        return res;
    }

    //高字节在前
    public static int toInt2(byte[] b){
         int res = 0;
         for(int i=0;i<b.length;i++){
                 res += (b[i] & 0xff) << ((3-i)*8);
             }
         return res;
     }

        /**
         * 将byte数组数据转换成float
         * @param arr
         * @return
         */
    public static float bytes2Float(byte[] arr) {
        int accum = 0;
        accum = accum|(arr[0] & 0xff) << 0;
        accum = accum|(arr[1] & 0xff) << 8;
        accum = accum|(arr[2] & 0xff) << 16;
        accum = accum|(arr[3] & 0xff) << 24;
        return Float.intBitsToFloat(accum);
    }

    /**
     * 将长度为2的byte数组转换为16位int
     *
     * @param res
     *      byte[]
     * @return int
     * */
    public static int byte2int(byte[] res) {
        // res = InversionByte(res);
        // 一个byte数据左移24位变成0x??000000，再右移8位变成0x00??0000
        int targets = (res[0] & 0xff) | ((res[1] << 8) & 0xff00); // | 表示安位或
        return targets;
    }

    /**
     * 将byte转换成double
     * @param arr
     * @return
     */
    public static double bytes2Double(byte[] arr) {
        long value = 0;
        for (int i = 0; i < 8; i++) {
            value |= ((long) (arr[i] & 0xff)) << (8 * i);
        }
        return Double.longBitsToDouble(value);
    }
}
